package cn.chiship.framework.upms.biz.system.entity;

import java.io.Serializable;

/**
 * @author lijian
 */
public class UpmsDataSource implements Serializable {
    private String id;

    /**
     * 创建时间
     *
     * @mbg.generated
     */
    private Long gmtCreated;

    /**
     * 更新时间
     *
     * @mbg.generated
     */
    private Long gmtModified;

    /**
     * 创建人
     *
     * @mbg.generated
     */
    private String createdBy;

    /**
     * 更新人
     *
     * @mbg.generated
     */
    private String modifyBy;

    /**
     * 逻辑删除（0：否，1：是）
     *
     * @mbg.generated
     */
    private Byte isDeleted;

    /**
     * 所属部门
     *
     * @mbg.generated
     */
    private String organizationId;

    /**
     * 数据源编码
     *
     * @mbg.generated
     */
    private String code;

    /**
     * 数据源名称
     *
     * @mbg.generated
     */
    private String name;

    /**
     * 备注
     *
     * @mbg.generated
     */
    private String remark;

    /**
     * 数据库类型
     *
     * @mbg.generated
     */
    private String dbType;

    /**
     * 驱动类
     *
     * @mbg.generated
     */
    private String dbDriver;

    /**
     * 数据源地址
     *
     * @mbg.generated
     */
    private String dbUrl;

    /**
     * 数据库名称
     *
     * @mbg.generated
     */
    private String dbName;

    /**
     * 用户名
     *
     * @mbg.generated
     */
    private String dbUsername;

    /**
     * 密码
     *
     * @mbg.generated
     */
    private String dbPassword;

    private static final long serialVersionUID = 1L;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Long getGmtCreated() {
        return gmtCreated;
    }

    public void setGmtCreated(Long gmtCreated) {
        this.gmtCreated = gmtCreated;
    }

    public Long getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Long gmtModified) {
        this.gmtModified = gmtModified;
    }

    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    public String getModifyBy() {
        return modifyBy;
    }

    public void setModifyBy(String modifyBy) {
        this.modifyBy = modifyBy;
    }

    public Byte getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Byte isDeleted) {
        this.isDeleted = isDeleted;
    }

    public String getOrganizationId() {
        return organizationId;
    }

    public void setOrganizationId(String organizationId) {
        this.organizationId = organizationId;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getDbType() {
        return dbType;
    }

    public void setDbType(String dbType) {
        this.dbType = dbType;
    }

    public String getDbDriver() {
        return dbDriver;
    }

    public void setDbDriver(String dbDriver) {
        this.dbDriver = dbDriver;
    }

    public String getDbUrl() {
        return dbUrl;
    }

    public void setDbUrl(String dbUrl) {
        this.dbUrl = dbUrl;
    }

    public String getDbName() {
        return dbName;
    }

    public void setDbName(String dbName) {
        this.dbName = dbName;
    }

    public String getDbUsername() {
        return dbUsername;
    }

    public void setDbUsername(String dbUsername) {
        this.dbUsername = dbUsername;
    }

    public String getDbPassword() {
        return dbPassword;
    }

    public void setDbPassword(String dbPassword) {
        this.dbPassword = dbPassword;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", gmtCreated=").append(gmtCreated);
        sb.append(", gmtModified=").append(gmtModified);
        sb.append(", createdBy=").append(createdBy);
        sb.append(", modifyBy=").append(modifyBy);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", organizationId=").append(organizationId);
        sb.append(", code=").append(code);
        sb.append(", name=").append(name);
        sb.append(", remark=").append(remark);
        sb.append(", dbType=").append(dbType);
        sb.append(", dbDriver=").append(dbDriver);
        sb.append(", dbUrl=").append(dbUrl);
        sb.append(", dbName=").append(dbName);
        sb.append(", dbUsername=").append(dbUsername);
        sb.append(", dbPassword=").append(dbPassword);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UpmsDataSource other = (UpmsDataSource) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getGmtCreated() == null ? other.getGmtCreated() == null : this.getGmtCreated().equals(other.getGmtCreated()))
            && (this.getGmtModified() == null ? other.getGmtModified() == null : this.getGmtModified().equals(other.getGmtModified()))
            && (this.getCreatedBy() == null ? other.getCreatedBy() == null : this.getCreatedBy().equals(other.getCreatedBy()))
            && (this.getModifyBy() == null ? other.getModifyBy() == null : this.getModifyBy().equals(other.getModifyBy()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()))
            && (this.getOrganizationId() == null ? other.getOrganizationId() == null : this.getOrganizationId().equals(other.getOrganizationId()))
            && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getDbType() == null ? other.getDbType() == null : this.getDbType().equals(other.getDbType()))
            && (this.getDbDriver() == null ? other.getDbDriver() == null : this.getDbDriver().equals(other.getDbDriver()))
            && (this.getDbUrl() == null ? other.getDbUrl() == null : this.getDbUrl().equals(other.getDbUrl()))
            && (this.getDbName() == null ? other.getDbName() == null : this.getDbName().equals(other.getDbName()))
            && (this.getDbUsername() == null ? other.getDbUsername() == null : this.getDbUsername().equals(other.getDbUsername()))
            && (this.getDbPassword() == null ? other.getDbPassword() == null : this.getDbPassword().equals(other.getDbPassword()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getGmtCreated() == null) ? 0 : getGmtCreated().hashCode());
        result = prime * result + ((getGmtModified() == null) ? 0 : getGmtModified().hashCode());
        result = prime * result + ((getCreatedBy() == null) ? 0 : getCreatedBy().hashCode());
        result = prime * result + ((getModifyBy() == null) ? 0 : getModifyBy().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        result = prime * result + ((getOrganizationId() == null) ? 0 : getOrganizationId().hashCode());
        result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getDbType() == null) ? 0 : getDbType().hashCode());
        result = prime * result + ((getDbDriver() == null) ? 0 : getDbDriver().hashCode());
        result = prime * result + ((getDbUrl() == null) ? 0 : getDbUrl().hashCode());
        result = prime * result + ((getDbName() == null) ? 0 : getDbName().hashCode());
        result = prime * result + ((getDbUsername() == null) ? 0 : getDbUsername().hashCode());
        result = prime * result + ((getDbPassword() == null) ? 0 : getDbPassword().hashCode());
        return result;
    }
}